package jFormattedTextField;

import java.awt.Color;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder;

import org.dyno.visual.swing.layouts.Bilateral;
import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;

//VS4E -- DO NOT REMOVE THIS LINE!
public class OnlinePayment extends JFrame {

	private static final long serialVersionUID = 1L;
	private JLabel jLabel0;
	private JPanel jPanel0;
	private JLabel jLabel1;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JLabel jLabel2;
	private JFormattedTextField txfCreditCardNumber;
	private JTextField txtName;
	private JFormattedTextField txfExpiryDate;
	private JLabel jLabel5;
	private JPanel jPanel1;
	private JButton btnSubmit;
	private JButton btnCancel;
	private JTextField jTextField0;
	private JLabel jLabel8;
	private JLabel jLabel7;
	private JLabel jLabel6;
	private JPanel jPanel2;
	private JTextArea txaStatus;
	private JScrollPane jScrollPane0;
	private static final String PREFERRED_LOOK_AND_FEEL = "javax.swing.plaf.metal.MetalLookAndFeel";
	public OnlinePayment() {
		initComponents();
	}

	private void initComponents() {
		setLayout(new GroupLayout());
		add(getJPanel0(), new Constraints(new Leading(14, 363, 10, 10), new Leading(17, 58, 10, 10)));
		add(getJPanel1(), new Constraints(new Leading(14, 362, 12, 12), new Leading(87, 155, 10, 10)));
		add(getJPanel2(), new Constraints(new Leading(17, 356, 12, 12), new Leading(248, 117, 10, 10)));
		add(getJScrollPane0(), new Constraints(new Leading(21, 348, 12, 12), new Leading(378, 80, 12, 12)));
		setSize(393, 467);
	}

	private JScrollPane getJScrollPane0() {
		if (jScrollPane0 == null) {
			jScrollPane0 = new JScrollPane();
			jScrollPane0.setViewportView(getJTextArea0());
		}
		return jScrollPane0;
	}

	private JTextArea getJTextArea0() {
		if (txaStatus == null) {
			txaStatus = new JTextArea();
			txaStatus.setText("jTextArea0");
		}
		return txaStatus;
	}

	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jPanel2 = new JPanel();
			jPanel2.setBorder(BorderFactory.createTitledBorder(null, "Security Code", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font("Dialog",
					Font.BOLD, 12), new Color(51, 51, 51)));
			jPanel2.setLayout(new GroupLayout());
			jPanel2.add(getJButton0(), new Constraints(new Leading(81, 10, 10), new Leading(62, 12, 12)));
			jPanel2.add(getJButton1(), new Constraints(new Leading(180, 12, 12), new Leading(62, 12, 12)));
			jPanel2.add(getJTextField0(), new Constraints(new Leading(114, 118, 10, 10), new Leading(34, 10, 10)));
			jPanel2.add(getJLabel8(), new Constraints(new Leading(244, 12, 12), new Leading(34, 12, 12)));
			jPanel2.add(getJLabel7(), new Constraints(new Leading(28, 10, 10), new Leading(34, 12, 12)));
			jPanel2.add(getJLabel6(), new Constraints(new Leading(35, 12, 12), new Leading(3, 10, 10)));
		}
		return jPanel2;
	}

	private JLabel getJLabel6() {
		if (jLabel6 == null) {
			jLabel6 = new JLabel();
			jLabel6.setText("Enter the number as seen in the lable on the right");
		}
		return jLabel6;
	}

	private JLabel getJLabel7() {
		if (jLabel7 == null) {
			jLabel7 = new JLabel();
			jLabel7.setText("Code:");
		}
		return jLabel7;
	}

	private JLabel getJLabel8() {
		if (jLabel8 == null) {
			jLabel8 = new JLabel();
			jLabel8.setText("abc");
		}
		return jLabel8;
	}

	private JButton getJButton1() {
		if (btnCancel == null) {
			btnCancel = new JButton();
			btnCancel.setText("Cancel");
		}
		return btnCancel;
	}

	private JButton getJButton0() {
		if (btnSubmit == null) {
			btnSubmit = new JButton();
			btnSubmit.setText("Submit");
		}
		return btnSubmit;
	}

	private JFormattedTextField getTxfExpiryDate() {
		if (txfExpiryDate == null) {
			txfExpiryDate = new JFormattedTextField();
		}
		return txfExpiryDate;
	}

	private JTextField getTxtName() {
		if (txtName == null) {
			txtName = new JTextField();
		}
		return txtName;
	}

	private JFormattedTextField getTxfCreditCardNumber() {
		if (txfCreditCardNumber == null) {
			txfCreditCardNumber = new JFormattedTextField();
		}
		return txfCreditCardNumber;
	}

	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.setBorder(BorderFactory.createTitledBorder(null, "Payment Details", TitledBorder.LEADING, TitledBorder.DEFAULT_POSITION, new Font("Dialog",
					Font.BOLD, 12), new Color(51, 51, 51)));
			jPanel1.setLayout(new GroupLayout());
			jPanel1.add(getJLabel1(), new Constraints(new Leading(10, 10, 10), new Leading(9, 10, 10)));
			jPanel1.add(getJLabel3(), new Constraints(new Leading(8, 12, 12), new Leading(64, 10, 10)));
			jPanel1.add(getJLabel4(), new Constraints(new Leading(8, 12, 12), new Leading(95, 10, 10)));
			jPanel1.add(getJLabel2(), new Constraints(new Leading(115, 10, 10), new Leading(37, 12, 12)));
			jPanel1.add(getTxfCreditCardNumber(), new Constraints(new Leading(132, 213, 10, 10), new Leading(62, 12, 12)));
			jPanel1.add(getTxtName(), new Constraints(new Bilateral(132, 12, 4), new Leading(5, 12, 12)));
			jPanel1.add(getJLabel5(), new Constraints(new Leading(261, 10, 10), new Leading(94, 12, 12)));
			jPanel1.add(getTxfExpiryDate(), new Constraints(new Leading(132, 123, 10, 10), new Leading(94, 12, 12)));
		}
		return jPanel1;
	}

	private JLabel getJLabel5() {
		if (jLabel5 == null) {
			jLabel5 = new JLabel();
			jLabel5.setText("(mm/yyyy)");
		}
		return jLabel5;
	}

	private JFormattedTextField getJFormattedTextField1() {
		if (txfExpiryDate == null) {
			txfExpiryDate = new JFormattedTextField();
			txfExpiryDate.setText("jFormattedTextField1");
		}
		return txfExpiryDate;
	}

	private JTextField getJTextField0() {
		if (jTextField0 == null) {
			jTextField0 = new JTextField();
			jTextField0.setText("jTextField0");
		}
		return jTextField0;
	}

	private JFormattedTextField getJFormattedTextField0() {
		if (txfCreditCardNumber == null) {
			txfCreditCardNumber = new JFormattedTextField();
			txfCreditCardNumber.setText("jFormattedTextField0");
		}
		return txfCreditCardNumber;
	}

	private JLabel getJLabel2() {
		if (jLabel2 == null) {
			jLabel2 = new JLabel();
			jLabel2.setText("Enter the name as it appears on the card.");
		}
		return jLabel2;
	}

	private JLabel getJLabel4() {
		if (jLabel4 == null) {
			jLabel4 = new JLabel();
			jLabel4.setText("Expiry Date:");
		}
		return jLabel4;
	}

	private JLabel getJLabel3() {
		if (jLabel3 == null) {
			jLabel3 = new JLabel();
			jLabel3.setText("Credit Card Nmber:");
		}
		return jLabel3;
	}

	private JLabel getJLabel1() {
		if (jLabel1 == null) {
			jLabel1 = new JLabel();
			jLabel1.setText("Name:");
		}
		return jLabel1;
	}

	private JPanel getJPanel0() {
		if (jPanel0 == null) {
			jPanel0 = new JPanel();
			jPanel0.setBorder(new LineBorder(Color.black, 1, false));
			jPanel0.setLayout(new GroupLayout());
			jPanel0.add(getJLabel0(), new Constraints(new Leading(84, 10, 10), new Leading(15, 10, 10)));
		}
		return jPanel0;
	}

	private JLabel getJLabel0() {
		if (jLabel0 == null) {
			jLabel0 = new JLabel();
			jLabel0.setText("Welcome to Online Payment");
		}
		return jLabel0;
	}

	private static void installLnF() {
		try {
			String lnfClassname = PREFERRED_LOOK_AND_FEEL;
			if (lnfClassname == null)
				lnfClassname = UIManager.getCrossPlatformLookAndFeelClassName();
			UIManager.setLookAndFeel(lnfClassname);
		} catch (Exception e) {
			System.err.println("Cannot install " + PREFERRED_LOOK_AND_FEEL
					+ " on this platform:" + e.getMessage());
		}
	}

	/**
	 * Main entry of the class.
	 * Note: This class is only created so that you can easily preview the result at runtime.
	 * It is not expected to be managed by the designer.
	 * You can modify it as you like.
	 */
	public static void main(String[] args) {
		installLnF();
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				OnlinePayment frame = new OnlinePayment();
				frame.setDefaultCloseOperation(OnlinePayment.EXIT_ON_CLOSE);
				frame.setTitle("OnlinePayment");
				frame.getContentPane().setPreferredSize(frame.getSize());
				frame.pack();
				frame.setLocationRelativeTo(null);
				frame.setVisible(true);
			}
		});
	}

}
